{extend name="../../base/view/common/base" /}

{block name="style"}
<style type="text/css">

.hejiBan{
    float: right;
    width: 300px;
    text-align: right;
}
    .tb_head{
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-content: center;
        justify-content: space-between;
        align-items: center;
    }
</style>
{/block}
<!-- 主体 -->
{block name="body"}
<div class="p-page">
    <div class="layui-row layui-col-space16">
        <div class="layui-col-md12">
          <div class="layui-col-md6 layui-padding-3">
              <div class="tb_head"><h3>待办事项</h3>
                  <a href="{:url('oa/message/index')}?isDbs=2">更多</a></div>

              <table class="layui-table">
                  <thead>
                  <tr>
                      <th>ID号</th>
                      <th>审批类型</th>
                      <th>提交人</th>
                      <th>操作</th>
                  </tr>
                  </thead>
                  <tbody>
                  {if $dbList}
                  {volist name='dbList' id='dl'}
                  <tr>
                      <td>{$dl.id}</td>
                      <td>{$dl.spTitle}</td>
                      <td>{$dl.createUser}</td>
                      <td><a href="javascript:" data-href="{:url($dl['url'])}" data-id="{$dl.action_id}" class="layui-btn layui-btn-xs layui-btn-normal db_a">详情</a></td>
                  </tr>
                  {/volist}
                  {else}
                  <tr>
                      <td colspan="4">暂无处理事项</td>
                  </tr>
                  {/if}
                  </tbody>
              </table>
          </div>
          <div class="layui-col-md6 layui-padding-3">
              <div class="tb_head">
              <h3>消息通知</h3>
                  <a href="{:url('oa/message/index')}?isDbs=1">更多</a>
              </div>
              <table class="layui-table">
                  <thead>
                  <tr>
                      <th>ID号</th>
                      <th>审批类型</th>
                      <th>审批结果</th>
                      <th>操作</th>
                  </tr>
                  </thead>
                  <tbody>
                  {if $mesList}
                  {volist name="mesList" id='ml'}
                  <tr>
                      <td>{$ml.id}</td>
                      <td>{$ml.spTitle}</td>
                      <td>{$ml.status}</td>
                      <td><a href="javascript:" data-id="{$ml.id}"  class="layui-btn layui-btn-xs layui-btn-normal mes_i">详情</a></td>
                  </tr>
                  {/volist}
                  {else}
                  <tr>
                      <td colspan="4">暂无处理事项</td>
                  </tr>
                  {/if}
                  </tbody>
              </table>
          </div>
        </div>
        <div class="layui-col-md12 layui-padding-3">
            <h3>业绩统计</h3>
            <form action="" class="layui-form">
                <div class="layui-form-item">
                    <div class="layui-input-inline">
                        <select name="nianfen" id="">
                        <option value="">年份</option>
                    </select></div>

                </div>
                <div class="hejiBan">合计: <span id="heji">123456</span></div>
            </form>
            <table class="layui-table">
                <thead>
                <tr>
                    <th>年份</th>
                    <th>1月</th>
                    <th>2月</th>
                    <th>3月</th>
                    <th>4月</th>
                    <th>5月</th>
                    <th>6月</th>
                    <th>7月</th>
                    <th>8月</th>
                    <th>9月</th>
                    <th>10月</th>
                    <th>11月</th>
                    <th>12月</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>2024</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                </tr>
                <tr>
                    <td>2023</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                    <td>1</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
{/block}
<!-- /主体 -->

<!-- 脚本 -->
{block name="script"}
<script>
    const moduleInit = ['tool','employeepicker','laydatePlus'];
    function gouguInit() {
        var tool=layui.tool;
        $(".db_a").click(function (res) {
            let id=$(this).attr('data-id')
            let url=$(this).attr('data-href');
            if (url){
                tool.side(url);
            }else {
                tool.side("{:url('oa/BusinessApply/view')}?id="+id);
            }

        })
        $(".mes_i").click(function (res) {
            let id=$(this).attr('data-id')
            console.log('aaaa',id)
            tool.side("{:url('oa/message/info')}?id="+id);
        })
    }
</script>
{/block}